package com.authority.common;

public enum StatusEnum {

	Disable(0, "停用"), Enable(1, "正常");

	private StatusEnum(int index, String text) {
		this.index = index;
		this.text = text;
	}

	private int index;

	private String text;

	public int getIndex() {
		return index;
	}

	public void setIndex(int index) {
		this.index = index;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public static String valueOf(int index) {
		for (StatusEnum t : StatusEnum.values()) {
			if (t.getIndex() == index) {
				return t.getText();
			}
		}
		return null;
	}

}
